package org.file5.util;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public class DataBean <E>{
	
	public static int PAGE_SIZE_PUBLIC =15;
	public static int PAGE_SIZE_ADMIN =100;
	public static int MAX_CHILD_CATEGORIES = 100;
	
	
	private int count;
	
	private String status;
	
	private List<E> data = new ArrayList<E>(0);

	public List<E> getData() {
		return data;
	}

	public void setData(List<E> data) {
		this.data = data;
	}

	public String getStatus() {
		return status;
	}
	
	public void addDataE(E e){
		this.data.add(e);
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public boolean isEmpty(){
		if(data == null||data.isEmpty()){
			return true;
		}
		return false;
	}
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}

}
